//-----------------------------------------------------------------------
// <copyright file="Style_SiteService.cs" company="FetCo">
//     Copyright (c) FetCo. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------	

using System;
using System.Collections;
using FetCo.Framework;
using ADESSA.Entities;
using ADESSA.Data;
    
namespace ADESSA.Business
{   
	/// <summary>
	/// 
	/// </summary> 
    public class Style_SiteService
    {
        #region Style_Site

        public static void CreateStyle_Site(Style_Site style_Site)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                style_SiteDAO.CreateStyle_Site(style_Site);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessCreateStyle_SiteException, ex);
            }
        }        

        public static void UpdateStyle_Site(Style_Site style_Site)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                style_SiteDAO.UpdateStyle_Site(style_Site);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessUpdateStyle_SiteException, ex);
            }
        }        

        public static void DeleteStyle_Site(int id)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                style_SiteDAO.DeleteStyle_Site(id);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessDeleteStyle_SiteException, ex);
            }
        }
        
        public static Style_Site GetStyle_Site(int id)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                return style_SiteDAO.GetStyle_Site(id);                
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessGetStyle_SiteException, ex);
            }
        }                

        public static Style_SiteCollection GetStyle_SiteList(Style_SiteColumns orderBy, OrderDirection orderDirection)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                return style_SiteDAO.GetStyle_SiteList(orderBy, orderDirection);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessGetStyle_SiteListException, ex);
            }
        }        

        public static Style_SiteCollection GetStyle_SiteList(Style_SiteColumns orderBy, OrderDirection orderDirection, int page, int pageSize, out int totalRecords)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                return style_SiteDAO.GetStyle_SiteList(orderBy, orderDirection, page, pageSize, out totalRecords);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessGetStyle_SiteListException, ex);
            }
        }        

	    public static Style_SiteCollection GetStyle_SiteListByParam(object orderBy, OrderDirection orderDirection,string where)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                return style_SiteDAO.GetStyle_SiteListByParam(orderBy, orderDirection,where);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessGetStyle_SiteListException, ex);
            }
        }        

        public static Style_SiteCollection GetStyle_SiteListByParam(object orderBy, OrderDirection orderDirection, int page, int pageSize,string Criteria, out int totalRecords)
        {            
            try
            {
                Style_SiteDAO style_SiteDAO = new Style_SiteDAO();
                return style_SiteDAO.GetStyle_SiteListByParam(orderBy, orderDirection, page, pageSize,Criteria, out totalRecords);
            }
            catch (BusinessException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                Logger.Error(ex);
                // wrap it and rethrow
                throw new BusinessException(SR.BusinessGetStyle_SiteListException, ex);
            }
        }        

        #endregion
    }
}